package cn.doitedu.utils;

import cn.doitedu.pojo.EventBean;
import cn.doitedu.pojo.RulesBean;
import cn.doitedu.pojo.TimerCondition;
import org.apache.flink.api.common.state.ListStateDescriptor;
import org.apache.flink.api.common.state.MapStateDescriptor;

public class StateDescriptorUtils {

    //广播规则的状态描述器
    public static final MapStateDescriptor<Long, RulesBean> rulesStateDescriptor = new MapStateDescriptor<Long, RulesBean>("rules-state", Long.class, RulesBean.class);

    //定时器触发条件的状态描述器
    public static final MapStateDescriptor<Long, TimerCondition> timerConditionStateDescriptor = new MapStateDescriptor<>("timerState", Long.class, TimerCondition.class);

    //保存用户近期行为的状态描述器
    public static final ListStateDescriptor<EventBean> eventBeanStateDescriptor = new ListStateDescriptor<EventBean>("event-state", EventBean.class);

    public static final MapStateDescriptor<String, String> cacheStateDescriptor = new MapStateDescriptor<String, String>("cache-state", String.class, String.class);


}
